﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
using Prism.Ioc;
using Prism.Unity;
using corpus_platform.Views;
using corpus_platform.Services;
using corpus_platform.ViewModels;
using corpus_platform.Data;

namespace corpus_platform
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : PrismApplication
    {
        protected override Window CreateShell()
        {
            return Container.Resolve<MainWindow>();
        }

        protected override void RegisterTypes(IContainerRegistry containerRegistry)
        {
            containerRegistry.RegisterSingleton<ConfigManager>();
            containerRegistry.RegisterSingleton<ISearchService<Frame>, FrameworkSearchService>();
            containerRegistry.RegisterSingleton<ISearchService<Ontology>, OntologySearchService>();
            //containerRegistry.RegisterSingleton<IAnnotationMaintainService, AnnotationMaintainService>();
            containerRegistry.RegisterDialog<OntologyEditer, OntologyEditerViewModel>("ontologyEditer");
            containerRegistry.RegisterDialog<FrameworkEditer, FrameEditerViewModel>("frameEditer");
            containerRegistry.RegisterDialog<MetaInformatioinConfirm, MetaInformatioinConfirmViewModel>("metaInformationConfirmWindow");
        }

    }
}
